#pragma once
#include "opengl.h"
#include "Kamehameha.h"
#include "MyMath.h"
#include "PlayerManage.h"
#include <XnCppWrapper.h>
#include <string>
#include <WinGDI.h>

enum GameState {
	GameState_Entry,
	GameState_Playing,
	GameState_EndPlay
}; 

struct RGBd{
	double R, G, B;

	RGBd(double r, double g, double b){
		R = r;	G = g;	B = b;
	}
};

class GameController
{
public:
	GameController(PlayerManage * const playerMng) : _PlayerManage(playerMng), _state(GameState_Entry) {};
	~GameController(void) {};

	bool GameStart();
	bool GameEnd();
	GameState GetState() const;
	void DrawGame() const;
	void DrawBar(float Scale, float Damage, RGBd clr) const;

  bool IsHitEffect(XnPoint3D p, float radius, XnUInt32 doUserID, DepthGenerator &depthGen, float &damage);

private:
	GameController(const GameController &);
	PlayerManage * const _PlayerManage;
	GameState _state;
	XnUInt32 _lostUser;
};

